Optimal. Leaf size=39 \[ 2 a \tan ^{-1}\left (\sqrt {x-1} \sqrt {x+1}\right )-\frac {\sqrt {x-1} \sqrt {x+1}}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.01, antiderivative size = 39, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.139, Rules used = {188, 151, 12, 92, 203} \[ 2 a \tan ^{-1}\left (\sqrt {x-1} \sqrt {x+1}\right )-\frac {\sqrt {x-1} \sqrt {x+1}}{x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 92
Rule 151
Rule 188
Rule 203
Rubi steps
\begin {align*} \int \frac {a^2 x^2-(1-a x)^2}{\sqrt {-1+x} x^2 \sqrt {1+x}} \, dx &=\int \frac {-1+2 a x}{\sqrt {-1+x} x^2 \sqrt {1+x}} \, dx\\ &=-\frac {\sqrt {-1+x} \sqrt {1+x}}{x}+\int \frac {2 a}{\sqrt {-1+x} x \sqrt {1+x}} \, dx\\ &=-\frac {\sqrt {-1+x} \sqrt {1+x}}{x}+(2 a) \int \frac {1}{\sqrt {-1+x} x \sqrt {1+x}} \, dx\\ &=-\frac {\sqrt {-1+x} \sqrt {1+x}}{x}+(2 a) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {-1+x} \sqrt {1+x}\right )\\ &=-\frac {\sqrt {-1+x} \sqrt {1+x}}{x}+2 a \tan ^{-1}\left (\sqrt {-1+x} \sqrt {1+x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 48, normalized size = 1.23 \[ \frac {2 a \sqrt {x^2-1} x \tan ^{-1}\left (\sqrt {x^2-1}\right )-x^2+1}{\sqrt {x-1} x \sqrt {x+1}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 40, normalized size = 1.03 \[ \frac {4 \, a x \arctan \left (\sqrt {x + 1} \sqrt {x - 1} - x\right ) - \sqrt {x + 1} \sqrt {x - 1} - x}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.29, size = 43, normalized size = 1.10 \[ -4 \, a \arctan \left (\frac {1}{2} \, {\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{2}\right ) - \frac {8}{{\left (\sqrt {x + 1} - \sqrt {x - 1}\right )}^{4} + 4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.00, size = 44, normalized size = 1.13 \[ \frac {\left (-2 a x \arctan \left (\frac {1}{\sqrt {x^{2}-1}}\right )-\sqrt {x^{2}-1}\right ) \sqrt {x -1}\, \sqrt {x +1}}{\sqrt {x^{2}-1}\, x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.98, size = 21, normalized size = 0.54 \[ -2 \, a \arcsin \left (\frac {1}{{\left | x \right |}}\right ) - \frac {\sqrt {x^{2} - 1}}{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.27, size = 444, normalized size = 11.38 \[ a\,\ln \left (\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}\right )\,2{}\mathrm {i}-a^2\,\mathrm {atan}\left (\frac {1024\,a^6}{1024\,a^5+1024\,a^7+\frac {a^6\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}+\frac {a^8\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}}+\frac {1024\,a^8}{1024\,a^5+1024\,a^7+\frac {a^6\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}+\frac {a^8\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}}-\frac {a^5\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\left (\sqrt {x+1}-1\right )\,\left (1024\,a^5+1024\,a^7+\frac {a^6\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}+\frac {a^8\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}\right )}-\frac {a^7\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\left (\sqrt {x+1}-1\right )\,\left (1024\,a^5+1024\,a^7+\frac {a^6\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}+\frac {a^8\,\left (\sqrt {x-1}-\mathrm {i}\right )\,1024{}\mathrm {i}}{\sqrt {x+1}-1}\right )}\right )\,4{}\mathrm {i}-a\,\ln \left (\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {x+1}-1\right )}^2}+1\right )\,2{}\mathrm {i}-\frac {\sqrt {x-1}-\mathrm {i}}{4\,\left (\sqrt {x+1}-1\right )}+a^2\,\mathrm {acosh}\relax (x)-\frac {\frac {5\,{\left (\sqrt {x-1}-\mathrm {i}\right )}^2}{4\,{\left (\sqrt {x+1}-1\right )}^2}+\frac {1}{4}}{\frac {{\left (\sqrt {x-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {x+1}-1\right )}^3}+\frac {\sqrt {x-1}-\mathrm {i}}{\sqrt {x+1}-1}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [C] time = 72.78, size = 117, normalized size = 3.00 \[ - \frac {a {G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {3}{4}, \frac {5}{4}, 1 & 1, 1, \frac {3}{2} \\\frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2} & 0 \end {matrix} \middle | {\frac {1}{x^{2}}} \right )}}{2 \pi ^{\frac {3}{2}}} + \frac {i a {G_{6, 6}^{2, 6}\left (\begin {matrix} 0, \frac {1}{4}, \frac {1}{2}, \frac {3}{4}, 1, 1 & \\\frac {1}{4}, \frac {3}{4} & 0, \frac {1}{2}, \frac {1}{2}, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{x^{2}}} \right )}}{2 \pi ^{\frac {3}{2}}} + \frac {{G_{6, 6}^{5, 3}\left (\begin {matrix} \frac {5}{4}, \frac {7}{4}, 1 & \frac {3}{2}, \frac {3}{2}, 2 \\1, \frac {5}{4}, \frac {3}{2}, \frac {7}{4}, 2 & 0 \end {matrix} \middle | {\frac {1}{x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} + \frac {i {G_{6, 6}^{2, 6}\left (\begin {matrix} \frac {1}{2}, \frac {3}{4}, 1, \frac {5}{4}, \frac {3}{2}, 1 & \\\frac {3}{4}, \frac {5}{4} & \frac {1}{2}, 1, 1, 0 \end {matrix} \middle | {\frac {e^{2 i \pi }}{x^{2}}} \right )}}{4 \pi ^{\frac {3}{2}}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________